<?php

namespace common\models\kingdee;

use Yii;

/**
 * This is the model class for table "T_HR_EMPLABORRELATION".
 *
 * @property string $FEFFDT
 * @property string $FLEFFDT
 * @property string $FHISTORYRELATEID
 * @property string $FCORPORATEUNITID
 * @property string $FLABORRELATIONSTATEID
 * @property integer $FLABORRELATIONTYPE
 * @property string $FFLOWINAFFAIRID
 * @property string $FPERSONID
 * @property string $FCREATORID
 * @property string $FCREATETIME
 * @property string $FLASTUPDATEUSERID
 * @property string $FLASTUPDATETIME
 * @property string $FCONTROLUNITID
 * @property string $FID
 * @property string $FEMPLOYEEMODLEID
 */
class HrEmpLaborRelation extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'T_HR_EMPLABORRELATION';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_hr');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['FEFFDT', 'FLEFFDT', 'FCREATETIME', 'FLASTUPDATETIME'], 'safe'],
            [['FLABORRELATIONTYPE'], 'integer'],
            [['FHISTORYRELATEID', 'FCORPORATEUNITID', 'FLABORRELATIONSTATEID', 'FPERSONID', 'FCREATORID', 'FLASTUPDATEUSERID', 'FCONTROLUNITID', 'FID', 'FEMPLOYEEMODLEID'], 'string', 'max' => 44],
            [['FFLOWINAFFAIRID'], 'string', 'max' => 100],
            [['FID', 'FID', 'FID', 'FID'], 'unique', 'targetAttribute' => ['FID', 'FID', 'FID', 'FID'], 'message' => 'The combination of  and Fid has already been taken.'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'FEFFDT' => Yii::t('kingdee', 'Feffdt'),
            'FLEFFDT' => Yii::t('kingdee', 'Fleffdt'),
            'FHISTORYRELATEID' => Yii::t('kingdee', 'Fhistoryrelateid'),
            'FCORPORATEUNITID' => Yii::t('kingdee', 'Fcorporateunitid'),
            'FLABORRELATIONSTATEID' => Yii::t('kingdee', 'Flaborrelationstateid'),
            'FLABORRELATIONTYPE' => Yii::t('kingdee', 'Flaborrelationtype'),
            'FFLOWINAFFAIRID' => Yii::t('kingdee', 'Fflowinaffairid'),
            'FPERSONID' => Yii::t('kingdee', 'Fpersonid'),
            'FCREATORID' => Yii::t('kingdee', 'Fcreatorid'),
            'FCREATETIME' => Yii::t('kingdee', 'Fcreatetime'),
            'FLASTUPDATEUSERID' => Yii::t('kingdee', 'Flastupdateuserid'),
            'FLASTUPDATETIME' => Yii::t('kingdee', 'Flastupdatetime'),
            'FCONTROLUNITID' => Yii::t('kingdee', 'Fcontrolunitid'),
            'FID' => Yii::t('kingdee', 'Fid'),
            'FEMPLOYEEMODLEID' => Yii::t('kingdee', 'Femployeemodleid'),
        ];
    }
}
